package com.kx.core.example;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * TODO添加类描述
 * @author     Kangx.li 1703054
 * @version    V1 2018年11月23日
 * @since      Java
 */
@Controller
public class UserErrorController {

    @GetMapping("/user/home")
    @ResponseBody
    public String home() {
	return "user home";
    }
    
    @GetMapping("/user/help")
    @ResponseBody
    public String help() {
	throw new IllegalArgumentException("args is empty");
    }
    
    @GetMapping("/user/error2")
    @ResponseBody
    public String error2() {
	int i = 1;
	int j = 0;
	j = i/j;
	return "j = "+j;
    }
    
    @GetMapping("/user/error")
    public String error() {
	return "error/error";
    }
}

